﻿using System.Threading;
using Windows.UI.Popups;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Navigation;
using Books.ViewModel;
using Services.Model;


namespace Books.View
{
    /// <summary>
    /// A page that displays a grouped collection of items.
    /// </summary>
    public sealed partial class HomePage : Page
    {
        /// <summary>
        /// NavigationHelper is used on each page to aid in navigation and 
        /// process lifetime management
        /// </summary>
 
        public HomePage()
        {
            this.InitializeComponent();
        }
        private MainViewModel getDataContext
        {
            get { return (MainViewModel)DataContext; }
        }
        private void hotBook_Tapped(object sender, TappedRoutedEventArgs e)
        {

        }
        private void Newest_ItemClick(object sender, ItemClickEventArgs e)
        {
            var getData=e.ClickedItem as BookList;
            if (getData != null)
                getDataContext.GetBookDetail(getData.book_id, string.Empty);
        }
    }
}
